[contents]
Preface
This document is part of the ScriptX Technical Reference Series. This series is for programmers using ScriptX to develop interactive multimedia tools and titles. This series includes the following documents:
- The ScriptX Components Guide provides an overview of ScriptX architecture, conceptual explanations about the organization of the ScriptX classes into components, and script examples showing how the classes work together. It covers ScriptX from the multimedia title, down to the operating system devices. This manual is essential to anyone designing and building multimedia titles in ScriptX. It is the companion volume to the ScriptX Class Reference.
- The ScriptX Class Reference is a detailed reference to the ScriptX class library that provides, in dictionary form, a complete specification of the classes, methods, variables, and functions available for building multimedia titles and tools in ScriptX. It is the companion volume to the ScriptX Components Guide.
- The ScriptX Language Guide (this manual) is a practical guide to using the ScriptX programming language. It provides complete functional descriptions of the language as well as concrete descriptions of tasks you might do when actually working with the ScriptX language. Anyone programming in ScriptX will want to use this book.
- The ScriptX Tools Guide provides information about the ScriptX development process that is not covered in the other manuals. The first part discusses how to use the browsers, the Listener and other tools that are supplied with ScriptX. All users will want to read this part. The second part explains how to extend ScriptX by loading classes written in C, and discusses platform-specific issues. Developers who wish to add classes written in C to ScriptX will want to read the second part. The third part of the ScriptX Tools Guide discusses how to build additional tools in ScriptX. Tool developers will want to read the third part.
- The ScriptX Quick Reference summarizes information about the ScriptX Language and Class Library. It includes the grammar of the language, listings of components and their classes, and an alphabetical reference to classes, including class variables, instance variables, and methods.
Who Should Read This Book
Anyone interested in learning about how to write ScriptX scripts should read this book. This book describes the ScriptX authoring language and provides many annotated examples that demonstrate how to perform basic tasks in ScriptX.
This book is a reference manual for the overall structure of the ScriptX scripting language, including syntax summaries and examples of its use. It contains nine chapters and two appendixes.
Chapter 1, "Introducing the ScriptX Language," is an overall introduction to the ScriptX language and to its use of object-oriented programming concepts.
Chapter 2, "ScriptX Building Blocks," describes the basic parts of ScriptX that are used to build larger expressions: numbers, strings, arrays, and arithmetic.
Chapter 3, "Working with Objects," includes information about creating and using ScriptX classes and objects, both the system-defined classes and any others that may be written in scripts.
Chapter 4, "Conditionals and Loops," describes the constructs in the ScriptX language for compound expressions and control flow.
Chapter 5, "Functions, Threads and Pipes," shows how to define functions in ScriptX and describes the thread and pipe operators.
Chapter 6, "Defining Classes and Objects," describes how to define and specialize new and existing classes and objects in the ScriptX language.
Chapter 7, "Collections," describes the classes that can contain other objects, and the searching and selecting protocol for those objects.
Chapter 8, "Exceptions," outlines the ScriptX exception system and the constructs in the language for catching and handling exceptions.
Chapter 9, "Modules," describes the module system in ScriptX, which allows name space packaging and management.
Appendix A, "ScriptX Reference," contains an EBNF grammar for the ScriptX Language. It includes detailed discussion of tokens, operators, reserved words, and expression syntax.
Appendix B, "Unicode Escape Characters," contains a table of Unicode values for special characters that are common to the Macintosh, OS/2, and Windows.
This manual is set primarily in Palatino and ITC Avant Garde, except that code examples and code words, including names of classes, functions, generic functions, and variables, are set in Courier
.
If the return value of an expression is relevant to the discussion, that result is shown after an arrow on the line following the code (if it's not relevant, nothing is shown):
2 + 2
4
Ellipses ( . . .
) replace parts of example scripts that are not relevant to the discussion:
class example (MyClass)
. . .
end
Definitions of syntax from the ScriptX language are shown with an initial graphic (
) to allow you to find them easily in the text.
if expression do expression
Syntax for function calls is shown with a different initial graphic (
). Global functions are functions that are not associated with any particular class or obejct. Generic functions are used to call methods on individual objects. Generic and global functions are not part of the ScriptX language itself; they are defined by the core classes, and by the scripted classes and objects you create in your own programs.
append collection value
In syntax definitions, the Courier
typeface indicates reserved words. Variable parts of the expression are in italic and are explained in the body of text following the definition.
Parts of syntax definitions that are optional are shown with brackets surrounding the optional part. These brackets are not part of the construct itself. They should be omitted in scripts:
exit [ with expression ]
Parts of scripts that are intended to be repeated multiple times contain an ellipsis ( . . .
) at the end of the series:
expression expression expression . . .
This file last updated on 02/19/96.
By Sandra Ware
;